class AddPostsCountToDocs < ActiveRecord::Migration
  def self.up
    add_column :articles, :posts_count, :integer, :default => 0
    add_column :reships, :posts_count, :integer, :default => 0
    add_column :albums, :posts_count, :integer, :default => 0
    add_column :photos, :posts_count, :integer, :default => 0
    add_column :valleyers, :posts_count, :integer, :default => 0
    add_column :meets, :posts_count, :integer, :default => 0
    add_column :post_sessions, :posts_count, :integer, :default => 0
  end

  def self.down
    remove_column :articles, :posts_count
    remove_column :reships, :posts_count
    remove_column :albums, :posts_count
    remove_column :photos, :posts_count
    remove_column :valleyers, :posts_count
    remove_column :meets, :posts_count
    remove_column :post_sessions, :posts_count
  end
end
